'use strict';

function average_uneven(collection) {
  let arr1=new Array();
  for(let i=0;i<collection.length;i++){
    if(collection[i]%2==1){
      arr1.push(collection[i]);
    }
  }
  let sum=0;
  for(let i=0;i<arr1.length;i++){
    sum=sum+arr1[i];
  }
  let result=sum/arr1.length;
  return result;
}

module.exports = average_uneven;
